<?php
	include("../is_login.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script charset="utf-8" src="../js/kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="../js/kindeditor/lang/zh-CN.js"></script>
<title>eidt</title>
</head>
<body>
	<?php
		$id = $_GET['id'];
		include('../function.php');
		$conn = conn();
		$sql = "select * from article where id=$id";
		$resourse = mysqli_query($conn,$sql); 
		$data = mysqli_fetch_assoc($resourse);
	?>
	<div>
		<div><b>添加新闻</b></div>
		<form action="edit_save.php" method="post" enctype="multipart/form-data">
			<input type="hidden" name="id" value="<?=$data['id']?>">
			<input type="hidden" name="cata_id" value="<?=$data['catalog_id']?>">
			<div><input type="text" name="title" value="<?=$data['title']?>"  placeholder="标题"/></div>
			<div><textarea  rows="3" name="desc" placeholder="简介"><?=$data['desc']?></textarea></div>
			<div>
				<span style="font-size:24px; color:green;">输入内容：</span>
				<textarea class="edit" rows="5" name="content" ><?=$data['content']?></textarea>
			</div>
			<div><img style="height:220px;" src="<?=$data['img']?>"><input type="file" name="img"></div>
			<div><input type="submit"  /></div>
		</form>
		<script>
			KindEditor.create('.edit');
		</script>
	</div>
	</body>
</html>